﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="tree.aspx.cs" Inherits="LabMS.Web.DictionaryMaintenance.tree" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>树页面</title>
    <link type="text/css" rel="stylesheet" href="../style/screen.css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../style/ie7.css" />
    <![endif]-->
</head>
<body class="mainBody">
    <div class="main">
        <div id="pageInfo" class="clearfix">
            <div class="title">
                <label>
                    字典维护</label>
            </div>
        </div>
    </div>
    <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 100%;"
        width="100%">
        <tr valign="top">
            <td style="width: 15%; height: 100%">
                <form id="form1" runat="server">
                    <div style="height: 600px; overflow: auto; margin: 3px; padding: 3px;">
                        <ul style="list-style: none; padding: 0; cursor: pointer;">
                            <li>数据字典</li>
                            <li>
                                <ul id="TreeData" style="list-style: none;">
                                </ul>
                            </li>
                        </ul>
                    </div>
                </form>
            </td>
            <td style="width: 85%; height: 100%;">
                <div id="main">
                    <iframe src="" frameborder="0" id="iframe1" name="iframe1" marginwidth="0" marginheight="0"
                        scrolling="auto" width="100%" height="100%"></iframe>
                </div>
            </td>
        </tr>
    </table>
</body>
</html>

<script type="text/javascript" src="../js/jQuery/jquery-1.3.1.js"></script>

<script type="text/javascript" src="../js/jQuery/jquery.tooltip.js"></script>

<script type="text/javascript" src="../js/jQuery/jquery.bgiframe.js"></script>

<script type="text/javascript" src="../js/jQuery/jquery.validate.js"></script>

<script type="text/javascript" src="../js/jQuery/jquery.json-1.3.min.js"></script>

<script type="text/javascript" src="../js/site.js"></script>

<script type="text/javascript">
    $.getJSON(
        "tree.ashx",
        function(data){
            if(data.error){
                alert('');
            } else {
                for(var i=0;i<data.length;i++){ //因为传过来的是列表，所以直接取data.lentgh
                    var json=data[i];
                    $("<li style='text-decoration: none; border: none;'><a href='#' target='iframe1' style='text-decoration: none; border: none;'><input type='hidden' id='hidden_ID' /><input type='hidden' id='hidden_Code' /></a></li>")
                        .find("a")
                        .html(json.Name)
                        .attr("href","DictionaryMaintenance.aspx?Name=" + escape(json.Name)+ "&Code="+escape(json.Code))
                    .end()
                        .find("input:first")
                        .html(json.ID)
                    .end()
                        .find("input:nth-child(2)")
                        .html(json.Code)
                    .end()
                    .appendTo("#TreeData");
                }
            }
        });
</script>

